import { getRandomDateTime, getNowDate, getFeatureDate } from '../../../utils'
import Mock from 'mockjs'
const { Random } = Mock
export const socialClientMock = pageSize => {
  const list = [
    { label: 'Gitee', value: 1 },
    { label: '钉钉', value: 2 },
    { label: '企业微信', value: 3 },
    { label: '微信公众平台', value: 4 },
    { label: '微信开发平台', value: 5 },
    { label: '微信小程序', value: 6 }
  ]
  const result: any[] = []
  for (let i = 0; i < list.length; i++) {
    result.push({
      id: i + 1,
      name: list[i].label,
      socialType: list[i].value,
      userType: Random.integer(1, 2),
      clientId: Mock.mock('@id'),
      clientSecret: Mock.mock('@word'),
      agentId: Mock.mock('@word'),
      status: Random.integer(0, 1), // 状态
      creator: '1',
      create_time: getRandomDateTime(getFeatureDate(-10), getNowDate()),
      updater: '',
      update_time: '',
      deleted: false,
      deleted_time: ''
    })
  }
  return result
}
